package com.edisoncgh.hw06;

import com.edisoncgh.hw06.entity.province;

public class judgement {
//    InputStream inputStream;

    public String doJudgement() {
        judge mJudge = new judge();

        province qingHai = new province("青海", 30);
        province aoMen = new province("澳门", 77);
        province ganSu = new province("甘肃", 344);
        province tianJin = new province("天津", 535);
        province jiangXi = new province("江西", 959);
        province fuJian = new province("福建", 1323);
        province heiLongJiang = new province("黑龙江", 2093);

        province[] provinces = {qingHai, aoMen, ganSu, tianJin, jiangXi, fuJian, heiLongJiang};

        String judgementResult = "";
        for (province el : provinces) {
            String tmpMsg = el.getName() + "是" + mJudge.doJudge(el) + "级地区";
            System.out.println(tmpMsg);
            judgementResult += (tmpMsg + "\n");
        }

        return judgementResult;
    }
}
